/**
 * Filename: DoSecretUtils.java
 * @author  Firefly
 * @contact postfirefly@163.com
 * @time    2016/3/9 4:11
 */
package com.github.postsanf.yinian.utils;


public class DoSecretUtils  {
    public static final DESUtil des = new DESUtil("yinianer");//自定义密钥

    // 字符串加密算法
    public static String doSecretStr(String str){
        String mw = null;
        try {
            mw= des.encrypt(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  mw;
    }

    // 字符串解密算法
    public static String getSecretStr(String str){
        String mw = null;
        try {
            mw =  des.decrypt(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  mw;
    }
}

